var sumOfLeftLeaves = function (root) {
    if (root === null) return 0;
    if (root.left === null && root.right === null) return 0;

    let leftNum = sumOfLeftLeaves(root.left);
    if (root.left && root.left.left === null && root.left.right === null) {
        leftNum = root.left.val
    }

    let rightNum = sumOfLeftLeaves(root.right);
    let sum = leftNum + rightNum;
    return sum
};